import 'dart:convert';

import 'package:flutter_deer/database/beans/get_user_info_entity.dart';
import 'package:flutter_deer/database/beans/pay/create_order_entity.dart';
import 'package:flutter_deer/generated/json/base/json_field.dart';
import 'package:flutter_deer/generated/json/post_discount_count_entity.g.dart';
export 'package:flutter_deer/generated/json/post_discount_count_entity.g.dart';

@JsonSerializable()
class PostDiscountCountEntity {
	bool? canUseStoreCoupon = false;
	String? energyCategoryId = '';
	String? energyGoodsId = '';
	String? goodsAmount = '';
	String? goodsPrice = '';
	String  mchCode = GetUserInfoEntity.get()?.loginMerchantCode?? '';
	String? mchMemberId = '';
	String? memberAccountId = '';
	String? payMethod = '';
	String? payType = '';
	String? quantity = '';
	List<StoreGoodsInfos>? storeGoodsInfos = [];

	PostDiscountCountEntity();

	factory PostDiscountCountEntity.fromJson(Map<String, dynamic> json) => $PostDiscountCountEntityFromJson(json);

	Map<String, dynamic> toJson() => $PostDiscountCountEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}